<template>
    <el-dialog v-model="$store.state.HomeMoudule.visible" title="删除提示" width="500" align-center>
        <span>你确定删除这条数据吗?</span>
        <template #footer>
            <div class="dialog-footer" style="text-align: right; margin: 0">
                <el-button @click="closeDLE(0)">取消</el-button>
                <el-button type="primary" @click="closeDLE(1)">
                    删除
                </el-button>
            </div>
        </template>
    </el-dialog>

</template>

<script lang="ts" setup>
import { ref, onMounted, reactive, onUpdated } from 'vue'
import { useStore } from "vuex";
import Link from "../api/Link.js";
import apiurl from "../api/url.js";

let store = useStore()
let closeDLE = async (numb: number) => {
    store.commit("DLE")
    if (numb == 1) {
        console.log(store.state.HomeMoudule.dellistdata)
        await Link(apiurl.userlist + "/" + store.state.HomeMoudule.dellistdata.id, "delete").then((ok: any) => {
            console.log("删除数据成功",ok)
        })
        store.dispatch("USERUPDATA_LIST")
    }
}


</script>